package com.tencent.iov.cowin.befsale.clue.service.clue;

import com.tencent.iov.cowin.befsale.clue.controller.clue.vo.request.ClueExpireRequest;
import com.tencent.iov.cowin.befsale.clue.controller.clue.vo.request.QueryClueCustomerCollectAllRequest;
import com.tencent.iov.cowin.befsale.clue.controller.clue.vo.response.ClueExpirePesponse;
import com.tencent.iov.cowin.befsale.clue.controller.clue.vo.response.ClueFollowHeadResponse;
import com.tencent.iov.cowin.befsale.clue.controller.clue.vo.response.ClueFollowHeadTypeResponse;
import com.tencent.iov.cowin.befsale.clue.controller.cus.vo.request.AddClueCustomerFollowRequest;
import com.tencent.iov.cowin.befsale.clue.controller.cus.vo.request.ClueIntentionGradeDataRequest;
import com.tencent.iov.cowin.befsale.clue.controller.cus.vo.request.UpdateClueCustomerRequest;
import com.tencent.iov.cowin.befsale.clue.domain.clue.po.ClueCustomerCollect;
import com.software.boot.common.model.dao.PageRequest;
import com.software.boot.common.model.dao.PageResponse;

import java.util.List;
/**
 * @Describe: 线索客户宽表_Service接口层
 * @author: whp
 * @created: 2021-12-23 14:53:39
 * @version: 1.0
 */

public interface ClueCustomerCollectService {

	/**
	 * 通过ID获取详细信息
	 *
	 * @param: id
	 * @return: ClueCustomerCollect对象
	 */
	ClueCustomerCollect getDetailById(Long id);

	/**
	 * 单条数据插入ClueCustomerCollect
	 * @param request
	 * @return 插入的条数
	 */
	Long insert(ClueCustomerCollect request);

	/**
	 * 批量插入ClueCustomerCollect
	 * @param requests
	 * @return 批量插入的条数
	 */
    int insertBatch(List<ClueCustomerCollect> requests);

	/**
	 * 单条ClueCustomerCollect更新
	 * @param request
	 * @return 更新的条数
	 */
    int update(ClueCustomerCollect request);

	/**
	 * 通过ID删除数据
	 * @param request
	 * @return 删除的条数
	 */
    int delete(ClueCustomerCollect request);

	/**
	 * 根据条件查询对象list列表
	 * @param request
	 * @return 查询结果
	 */
    List<ClueCustomerCollect> getListByParam(ClueCustomerCollect request);

	/**
	 * 根据条件查询对象Page记录
	 * @param request
	 * @return 查询结果
	 */
	PageResponse<ClueCustomerCollect> getPageByParam(PageRequest<ClueCustomerCollect> request);

	/**
	 * 根据条件查询对象Page记录
	 * @param request
	 * @return 查询结果
	 */
	PageResponse<ClueCustomerCollect> getPageByParamAll(PageRequest<QueryClueCustomerCollectAllRequest> request);

	/**
	 * 线索跟进列表头部显示
	 *
	 * @param: id
	 * @return: ClueFollowHeadResponse
	 */
	ClueFollowHeadResponse getHeadContent(QueryClueCustomerCollectAllRequest request);

	/**
	 * 头部部跟进内容统计
	 * @param request
	 * @return 头部部跟进内容统计
	 */
	List<ClueFollowHeadTypeResponse>  getClueFollowHeadTypeResponse(ClueCustomerCollect request);

	/**
	 * 线索状态头部部跟进内容统计
	 * @param request
	 * @return 头部部跟进内容统计
	 */

	List<ClueFollowHeadTypeResponse> getClueStatusHeadTypeResponse(QueryClueCustomerCollectAllRequest request);

	/**
	 * 单条ClueCustomerCollect更新
	 * @param request
	 * @return 更新的条数
	 */
	int updateByIds(ClueCustomerCollect request);


	/**
	 * 头部部战败审批统计
	 * @param request
	 * @return 头部部战败审批统计
	 */
	List<ClueFollowHeadTypeResponse> getClueFailFollowHeadTypeResponse(QueryClueCustomerCollectAllRequest request);


	/**
	 *头部部线索分配统计
	 *
	 */
	List<ClueFollowHeadTypeResponse> getClueDistributeResponse(QueryClueCustomerCollectAllRequest request);

	/**
	 * 获取一个线索宽表信息
	 * @param collectRequest 宽表请求参数
	 * @return 线索宽表信息
	 */
	ClueCustomerCollect getOneByParam(ClueCustomerCollect collectRequest);

	/**
	 * 更新线索宽表线索客户信息与意向信息
	 * @param request 参数
	 * @return 是否更新成功
	 */
    Boolean updateClueCustomerCollect(UpdateClueCustomerRequest request);

	/**
	 * 更新宽表跟进信息
	 * @param request 跟进参数
	 * @return 是否更新成功
	 */
	Boolean updateByFollowInfo(AddClueCustomerFollowRequest request);

	int updateByClueId(ClueCustomerCollect request);


	/**
	 * 单条数据查询统计 ClueCustomerCollect
	 * @param request
	 * @return 插入的条数
	 */
	int getClueCustomerCollect(QueryClueCustomerCollectAllRequest request);

	/**
	 * 总部逾期已跟进or 经销商逾期已跟进
	 * @param request
	 * @return
	 */
	PageResponse<ClueExpirePesponse> getOemOrDealerClueExpireList(PageRequest<ClueExpireRequest> request);

	/**
	 * 总部逾期已跟进or 经销商逾期已跟进
	 * @param request
	 * @return
	 *PageResponse<ClueExpirePesponse> getOemOrDealerClueExpireList(PageRequest<ClueExpireRequest> request,String num);
	 */


	/**
	 * 更新宽表数据（经销商-> cusId + dealerId > 0 总部-> cusId + dealerId is null / = 0 = ''）
	 * @param request 更新参数
	 * @return 更新条数
	 */
    int updateByCusIdsAndDealerId(ClueCustomerCollect request);

	/**
	 * 根据条件查看显示未分配的数量
	 * add by zly
	 * @param clueIntentionGradeDataRequest
	 * @return
	 */
	Integer getDistributeCount(ClueIntentionGradeDataRequest clueIntentionGradeDataRequest);

	/**
	 * 更新宽表
	 * @param clueCustomerCollect
	 * @return
	 */
    int updateByIdAndUpdateTime(ClueCustomerCollect clueCustomerCollect);
}